package com.lry.rpc.config;

public class NettyBaseConfig {

    protected static final int MAX_READ_IDLE_SECONDS = 150;
    protected static final int MAX_WRITE_IDLE_SECONDS = 100;
    protected static final int MAX_ALL_IDLE_SECONDS = 100;
    protected String host = "localhost";
    protected int port = 8888;


    public static int getMaxAllIdleSeconds() {
        return MAX_ALL_IDLE_SECONDS;
    }

    public static int getMaxReadIdleSeconds() {
        return MAX_READ_IDLE_SECONDS;
    }

    public static int getMaxWriteIdleSeconds() {
        return MAX_WRITE_IDLE_SECONDS;
    }

    public int getPort() {
        return port;
    }

    public void setPort(Integer port){
        //检查端口范围
        if(null==port){
            return;
        }
        this.port = port;
    }

    public String getHost() {
        return host;
    }
}
